import { FormSchema } from '/@/components/Table';
export const formSchema: FormSchema[] = [
  {
    field: 'userRealNames',
    label: '用户',
    colProps: {
      span: 24,
    },
    required: true,
    component: 'SelectUserInput',
    componentProps: ({ schema, tableAction, formActionType, formModel }) => {
      return {
        onChange: (value, record) => {
          console.log('value,e', value, record);
          formModel['users'] = record.dataRef.userNames || '';
          console.log({ schema, tableAction, formActionType, formModel });
        },
      };
    },
  },
  {
    field: 'users',
    label: 'users',
    colProps: {
      span: 24,
    },
    component: 'Input',
    show: false,
  },
  {
    field: 'module',
    label: '模块',
    component: 'CheckboxGroup',
    colProps: {
      span: 24,
    },
    required: true,
    componentProps: {
      options: [
        {
          value: 'fileark',
          label: '个人文件柜',
        },
        {
          value: 'plan',
          label: '日程安排',
        },
        {
          value: 'mywork',
          label: '工作报告',
        },
        {
          value: 'message',
          label: '内部消息',
        },
        {
          value: 'address',
          label: '通讯录',
        },
      ],
    },
  },
  {
    field: 'beginDate',
    label: '时间',
    component: 'DatePicker',
    required: true,
    subLabel: '早于',
    componentProps: {
      valueFormat: 'YYYY-MM-DD',
      format: 'YYYY-MM-DD',
      showTime: false,
      style: 'width:100%',
      getPopupContainer: () => document.body,
    },
    colProps: {
      span: 24,
    },
  },
];
